from random import uniform
NUMTEST = 30
for test in range(0,NUMTEST):
	cantFilas = test
	for cantCaballos in range(0,int(cantFilas*cantFilas/2)):
		#cantCaballos = int(uniform(0,cantFilas*cantFilas))
		print cantFilas,cantCaballos
		for c in range(1,cantCaballos+1):
			print int(uniform(1,cantFilas)),int(uniform(1,cantFilas))

print 0
